#ifndef __SpineViewer_H__
#define __SpineViewer_H__

#include "BaseViewer.h"

namespace spine
{
    class SkeletonAnimation;
}
struct spTrackEntry;

class SpineViewer : public BaseViewer
{
public:
    virtual bool initUI();

    CREATE_FUNC(SpineViewer);
    SpineViewer();

    virtual ui::Widget* createItem(int nIndex, std::string strName);
    virtual void Export(std::string strPath);
    virtual bool LoadFile(std::string strPath);
    virtual void ClearCache();
    void update(float dt);

private:
    ui::Slider *m_pTimeSlider;
    ui::Slider *m_pScaleSlider;
    ui::ListView *m_pAnimList;
    ui::ListView *m_pSkinList;
    spine::SkeletonAnimation* m_pAnimation;
    ui::Button *m_pSelectedItem;
    ui::Button *m_pSkinSelectedItem;
    ui::Text *m_pTimeText;
    spTrackEntry *m_pTrackEntry;
    ui::CheckBox *m_pShowSlot;
    ui::CheckBox *m_pShowBone;
};

#endif // __SpineViewer_H__
